Don't call CloseHandle() on the HMODULE returned from GetModuleHandle().
authorTor Lillqvist <tml@iki.fi>
Tue, 2 Sep 2003 23:33:02 +0000 (23:33 +0000)
committerTor Lillqvist <tml@src.gnome.org>
Tue, 2 Sep 2003 23:33:02 +0000 (23:33 +0000)
2003-09-02  Tor Lillqvist  <tml@iki.fi>

* gdk/win32/gdkdisplay-win32.c (gdk_display_open): Don't call
CloseHandle() on the HMODULE returned from GetModuleHandle().
Didn't cause any harm, but didn't do anything useful either. When
running a GTK+ program under MS's debugger, the CloseHandle() call
would cause a "first-chance exception" in ntdll.dll to show up.
(The exception is caught appropriately if you let it proceed, but
it confuses the person using the debugger). Thanks to Bruce
Hochstetler for noticing.

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gdk/win32/gdkdisplay-win32.c

index 6db564d14cd606563940d3507a08dfcd06b67f48..01087f63cc4701b111c27c0cc5ecd95d248c80fa 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2003-09-02  Tor Lillqvist  <tml@iki.fi>
+
+       * gdk/win32/gdkdisplay-win32.c (gdk_display_open): Don't call
+       CloseHandle() on the HMODULE returned from GetModuleHandle().
+       Didn't cause any harm, but didn't do anything useful either. When
+       running a GTK+ program under MS's debugger, the CloseHandle() call
+       would cause a "first-chance exception" in ntdll.dll to show up.
+       (The exception is caught appropriately if you let it proceed, but
+       it confuses the person using the debugger). Thanks to Bruce
+       Hochstetler for noticing.
+
 Tue Sep  2 21:01:19 2003  Kristian Rietveld  <kris@gtk.org>
 
        Merge from stable.
index 6db564d14cd606563940d3507a08dfcd06b67f48..01087f63cc4701b111c27c0cc5ecd95d248c80fa 100644 (file)
@@ -1,3 +1,14 @@
+2003-09-02  Tor Lillqvist  <tml@iki.fi>
+
+       * gdk/win32/gdkdisplay-win32.c (gdk_display_open): Don't call
+       CloseHandle() on the HMODULE returned from GetModuleHandle().
+       Didn't cause any harm, but didn't do anything useful either. When
+       running a GTK+ program under MS's debugger, the CloseHandle() call
+       would cause a "first-chance exception" in ntdll.dll to show up.
+       (The exception is caught appropriately if you let it proceed, but
+       it confuses the person using the debugger). Thanks to Bruce
+       Hochstetler for noticing.
+
 Tue Sep  2 21:01:19 2003  Kristian Rietveld  <kris@gtk.org>
 
        Merge from stable.
index 6db564d14cd606563940d3507a08dfcd06b67f48..01087f63cc4701b111c27c0cc5ecd95d248c80fa 100644 (file)
@@ -1,3 +1,14 @@
+2003-09-02  Tor Lillqvist  <tml@iki.fi>
+
+       * gdk/win32/gdkdisplay-win32.c (gdk_display_open): Don't call
+       CloseHandle() on the HMODULE returned from GetModuleHandle().
+       Didn't cause any harm, but didn't do anything useful either. When
+       running a GTK+ program under MS's debugger, the CloseHandle() call
+       would cause a "first-chance exception" in ntdll.dll to show up.
+       (The exception is caught appropriately if you let it proceed, but
+       it confuses the person using the debugger). Thanks to Bruce
+       Hochstetler for noticing.
+
 Tue Sep  2 21:01:19 2003  Kristian Rietveld  <kris@gtk.org>
 
        Merge from stable.
index 6db564d14cd606563940d3507a08dfcd06b67f48..01087f63cc4701b111c27c0cc5ecd95d248c80fa 100644 (file)
@@ -1,3 +1,14 @@
+2003-09-02  Tor Lillqvist  <tml@iki.fi>
+
+       * gdk/win32/gdkdisplay-win32.c (gdk_display_open): Don't call
+       CloseHandle() on the HMODULE returned from GetModuleHandle().
+       Didn't cause any harm, but didn't do anything useful either. When
+       running a GTK+ program under MS's debugger, the CloseHandle() call
+       would cause a "first-chance exception" in ntdll.dll to show up.
+       (The exception is caught appropriately if you let it proceed, but
+       it confuses the person using the debugger). Thanks to Bruce
+       Hochstetler for noticing.
+
 Tue Sep  2 21:01:19 2003  Kristian Rietveld  <kris@gtk.org>
 
        Merge from stable.
index 6db564d14cd606563940d3507a08dfcd06b67f48..01087f63cc4701b111c27c0cc5ecd95d248c80fa 100644 (file)
@@ -1,3 +1,14 @@
+2003-09-02  Tor Lillqvist  <tml@iki.fi>
+
+       * gdk/win32/gdkdisplay-win32.c (gdk_display_open): Don't call
+       CloseHandle() on the HMODULE returned from GetModuleHandle().
+       Didn't cause any harm, but didn't do anything useful either. When
+       running a GTK+ program under MS's debugger, the CloseHandle() call
+       would cause a "first-chance exception" in ntdll.dll to show up.
+       (The exception is caught appropriately if you let it proceed, but
+       it confuses the person using the debugger). Thanks to Bruce
+       Hochstetler for noticing.
+
 Tue Sep  2 21:01:19 2003  Kristian Rietveld  <kris@gtk.org>
 
        Merge from stable.
index 2439f970a95afacc51eec41f8de68b0c53a249af..80441ca35ad6e3823032814898f039a11e088deb 100644 (file)
@@ -119,8 +119,6 @@ gdk_display_open (const gchar *display_name)
   p_EnumDisplayMonitors = (t_EnumDisplayMonitors) GetProcAddress (user32, "EnumDisplayMonitors");
   p_GetMonitorInfoA = (t_GetMonitorInfoA) GetProcAddress (user32, "GetMonitorInfoA");
 
-  CloseHandle (user32);
-  
   if (p_EnumDisplayMonitors != NULL && p_GetMonitorInfoA != NULL)
     {
       gint i, index;